/* Message List */
// a.k.a. notifications in the menu

// main list
.message-list {
  width: 31.5em;
  padding: 0 $container_padding * 2;
  color: $secondary_fg_color;
  text-shadow: none;

  .message-list-placeholder { spacing: 12px; }
}

.message-list-sections {
  spacing: $container_padding;
  margin: 0 $container_margin * 4; // to account for scrollbar
}

.message-list-section,
.message-list-section-list {
  spacing: $container_padding;
}

// do-not-disturb + clear button
.message-list-controls {
  margin: ($container_margin * 2) ($container_margin * 4) 0;
  // NOTE: remove the padding if notification_bubble could remove margin for drop shadow
  padding: $container_margin;
  spacing: $container_padding * 2;
}

// message bubbles
.message {
  background-color: if($variant == 'light', rgba(black, 0.04), rgba(white, 0.03));
  border: none;
  border-radius: $buttons_radius;
  color: $secondary_fg_color;
  text-shadow: none;

  &:hover, &:focus { background-color: $divider_color; }
  &:active { background-color: $track_color; }

  .popup-menu & { box-shadow: none; }

  // icon container
  .message-icon-bin {
    padding: $container_padding * 3 0;
    margin-left: $container_padding * 2;

    // icon size and color
    > StIcon {
      icon-size: 36px;
      // -st-icon-style: symbolic;
    }

    // fallback
    > .fallback-app-icon {
    }
  }

  // content
  .message-content {
    padding: $container_padding * 2;
    color: $secondary_fg_color;
  }

  // title
  .message-title {
    font-weight: bold;
    // margin-top: $container_padding;
  }

  // secondary container in title box
  .message-secondary-bin {
    padding: 0 $container_margin * 2;

    // notification time stamp
    > .event-time {
      color: $secondary_fg_color;
      font-size: 1em;
      padding-bottom: 0.13em;

      &:ltr { text-align: right };
      &:rtl { text-align: left };
    }
  }

  // close button
  .message-close-button {
    color: $secondary_fg_color;
    padding: 0;
    height: $menuitem-size - 4px;
    width: $menuitem-size - 4px;
    border-radius: $circular_radius;

    &:hover, &:focus { color: $fg_color; background-color: $divider_color; }
    &:active { color: $fg_color; background-color: $track_color; }
    &:insensitive { color: $disabled_secondary_fg_color; }
  }

  // body
  .message-body {
    color: $hint_fg_color;
  }
}

// URLs in messages
.url-highlighter {
  link-color: $link_color;
}

/* Media Controls */
.message-media-control {
  margin: ($container_padding * 2 + 10px) 4px;
  padding: $container_padding * 1.5;
  border-radius: $circular_radius;
  color: $secondary_fg_color;
  &:hover, &:focus { color: $fg_color; background-color: $divider_color; }
  &:active { color: $fg_color; background-color: $track_color; }
  &:insensitive { color: $disabled_secondary_fg_color; }

  &:last-child:ltr { margin-right: 16px; }
  &:last-child:rtl { margin-left: 16px; }
}

// album-art
.media-message-cover-icon {
  icon-size: 32px !important;
  margin: 0;
  padding: 0;

  // when there is no artwork
  &.fallback {
    background-color: $divider_color;
    padding: 8px;
    color: $hint_fg_color;
    border: none;
    border-radius: $circular_radius;
    icon-size: 24px !important;
  }
}
